package com.zykj.eureka.client.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zhoulj(周利军) [1217102780@qq.com]
 * @Title: DemoController
 * @Project: ${MODEL_NAME}
 * @Module ID:   <(模块)类编号，可以引用系统设计中的类编号>
 * @Comments: <对此类的描述，可以引用系统设计中的描述>
 * @JDK version used:      <JDK1.8> 32
 * @since 2018/12/22-0:32
 */
@RestController
@RequestMapping("demo")
public class DemoController {

    @Value("${server.port}")
    private String port;

    @RequestMapping
    public String index(@RequestParam(defaultValue = "demo-name") String name) {
        System.out.println("当前服务端口：" + port);
        return name + "当前访问服务的端口地址为："+ port;
    }
}
